/**
 * @brief link list
 * @author xiaoyao
 * @file linkls.h
 * @version V0.01
 */

#ifndef __LINKLS_H
#define __LINKLS_H

#ifdef __cplusplus
extern "C"
{
#endif

/* ------------------------------------------------------------------------- */
#include "stdint.h"

    struct linkls_s
    {
        struct linkls_s *prev;
        struct linkls_s *next;

        void *data;
    };

    int LinkLsAdd(struct linkls_s *pll, struct linkls_s *newll);
    int LinkLsGetItemCnt(struct linkls_s *pll);
    int linklsDelAll(struct linkls_s *pll, void (*pdll)(struct linkls_s *));

    /* ------------------------------------------------------------------------- */

#ifdef __cplusplus
}
#endif

#endif //__LINKLS_H
